<?php
class Application_Model_Db_Students extends Zend_Db_Table_Abstract{
	protected $_name = 'students';
	protected $_primary = 'student_id';
	protected $_referenceMap    = array(
			'Application_Model_Db_Groups' => array(
			'columns'			=> array('group_id'),
			'refTableClass'	=> 'Application_Model_Db_Groups',
			'refColumns'		=> array('group_id')
	));
	function getList(){
		$temp = $this->fetchAll();
		foreach($temp as $row){
			$dep = (array) $row->findDependentRowset('Application_Model_Db_Groups')->toArray();
			$out[] = array_merge($row->toArray(),array('group'=>$dep['name']));
		}
	}
}